Defines the signature of a subroutine used to compute a resampling of data for bootstrapping purposes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The N-element array to resample. |
|
| real(kind=real64), | intent(out), | dimension(size(x)) | :: | xn |
An N-element array where the resampled data set will be written. |
Defines the signature of a function for computing the desired bootstrap statistic.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The array of data to analyze. |
The resulting statistic.
A collection of statistics resulting from the bootstrap process.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public | :: | bias |
The bias in the statistic. |
|||
| real(kind=real64), | public | :: | lower_confidence_interval |
The lower confidence limit on the statistic. |
|||
| real(kind=real64), | public, | allocatable, dimension(:) | :: | population |
The bootstrap statistic replicates, excluding the observed statistic. |
||
| real(kind=real64), | public | :: | standard_error |
The standard error. |
|||
| real(kind=real64), | public | :: | statistic_value |
The value of the statistic of interest. |
|||
| real(kind=real64), | public | :: | upper_confidence_interval |
The upper confidence limit on the statistic. |
Performs a bootstrap calculation on the supplied data set for the given statistic. The default implementation utlizes a random resampling with replacement. Other resampling methods may be defined by specifying an appropriate routine by means of the method input. The module provides another option, random_resample, which is a parametric Gaussian bootstrap based on the sample mean and standard deviation. It assumes normally distributed observations. The confidence limits are percentile intervals calculated from the bootstrap replicates.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| procedure(bootstrap_statistic_routine), | intent(in), | pointer | :: | stat |
The routine used to compute the desired statistic. |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The N-element data set. |
|
| procedure(bootstrap_resampling_routine), | intent(in), | optional, | pointer | :: | method |
An optional pointer to the method to use for resampling of the data. If no method is supplied, a random resampling is utilized. |
| integer(kind=int32), | intent(in), | optional | :: | nsamples |
An optional input, that if supplied, specifies the number of bootstrap replicates to generate. The default is 10 000. |
|
| real(kind=real64), | intent(in), | optional | :: | alpha |
An optional input, that if supplied, defines the significance level to use for the analysis. The default is 0.05. |
The resulting bootstrap_statistics type containing the confidence intervals, bias, standard error, etc. for the analyzed statistic.
Parametric Gaussian resampling using the sample mean and standard deviation. This assumes the observations are normally distributed; it is not the nonparametric bootstrap.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The N-element array to resample. |
|
| real(kind=real64), | intent(out), | dimension(size(x)) | :: | xn |
An N-element array where the resampled data set will be written. |
Resamples a time series using a circular moving-block bootstrap. The block length is floor(sqrt(n)), with a minimum of two when possible. Define a custom callback to use a domain-specific block length.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The N-element time series. |
|
| real(kind=real64), | intent(out), | dimension(size(x)) | :: | xn |
The resampled series, assembled from circular blocks. |
Resamples balanced clusters with replacement. The input stores contiguous records as [cluster_id, value], with every cluster having the same number of records. The statistic routine should use the value fields and ignore the cluster identifiers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
An even-length array of contiguous cluster-id/value records. |
|
| real(kind=real64), | intent(out), | dimension(size(x)) | :: | xn |
The resampled records in the same layout. |
Resamples paired observations with replacement. The input stores each pair as adjacent values: [x1, y1, x2, y2, ...].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
An even-length array of interleaved paired observations. |
|
| real(kind=real64), | intent(out), | dimension(size(x)) | :: | xn |
The resampled pairs in the same interleaved layout. |
Random resampling with replacement from the supplied sample.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The N-element array to resample. |
|
| real(kind=real64), | intent(out), | dimension(size(x)) | :: | xn |
An N-element array where the resampled data set will be written. |